package com.matang.jpsh;

import java.util.ArrayList;

import com.db.DBService;
import com.http.UserInfoTask;
import com.modle.User;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;
import android.text.NoCopySpan.Concrete;

public class GetUsrInfoService  implements UserInfoTask.CallBack,Runnable{
	private String fid;
	private String uid;
	private Context context;
	private ArrayList<User> datas = new ArrayList<User>();
	public GetUsrInfoService(String fid,String uid,Context context) {
		this.fid =fid;
		this.uid=uid;
		this.context = context;
	}

	public void procError(String msg) {
		
		
	}
	/* 
	 * 返回的usr
	 */
	public void procUserInfoData(User data) {
		datas.clear();
		datas.add(data);
		DBService.saveUserList(context, uid, datas);
	

	}

	public void procUserInfoError(String msg) {
		
		
	}
	private void loadUserData() {
	
		new UserInfoTask(this).execute(fid);
	}

	@Override
	public void run() {
		loadUserData();
		
	}


}
